import Vue from 'vue';
import Vuex from 'vuex';
import persistedState from 'vuex-persistedstate';
import common from './modules/common';

Vue.use(Vuex);

const store = new Vuex.Store({
  strict: true,
  plugins: [
    persistedState({
      key: 'retail-store-app',
      reducer(state) {
        return {
          common: state.common,
        };
      },
    }),
  ],
  modules: {
    common,
  },
});

export default store;
